home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0048-Undoable lists-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-11  |  1.5 KB  |  49 lines  |  [TEXT/GEOL]

  1. Item    0012495                         11-Oct-89        13:40
  2.  
  3. From:   D1282                           Power Up,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    Undoable lists
  8.  
  9. Attn:  MacApp.Tech$
  10. SentBy: James Plamondon
  11. Date   10/11/89
  12. Subject    Undoable lists
  13. From   James Plamondon
  14. To  MacApp.Tech$
  15.  
  16. Subject:   Undoable lists
  17. Gentlepersons,
  18.  
  19. Here's a quick question for you.  I need to keep track of items cut from and
  20. pasted into a list, so that I can undo the cut or paste as requested.
  21.  
  22. My first thought on how to do this is to keep a flag in each list item,
  23. indicating whether the item was just added to the list, just deleted from the
  24. list, or was a 'normal' list item.  A Commit() would change the 'just added'
  25. items to 'normal' and permanently delete the 'just deleted' items.  An Undo()
  26. would change the 'just added' items to 'just deleted' items, and vice versa.
  27.  
  28. With this in mind, I have two questions:
  29.     1)  Does anybody see anything wrong with this approach, or, alternatively,
  30. a better
  31.           approach?  Any words of warning, things to look out for, etc.?
  32.     2) If the approach is sound, does anyone have such a list class (possibly
  33. a descendant of
  34.           TList) that they might be willing to share?
  35.  
  36. Thanks for your help!
  37.  
  38. James Plamondon
  39. Software Engineer
  40. PowerUp! Software
  41. 2929 Campus Drive, Suite 300
  42. San Mateo, CA  94403
  43. (415) 345-5900 x351
  44. AppleLink: D1282
  45. CompuServe: 71230,734
  46.  
  47. P.S.:  This would be trivially easy in Eiffel.
  48.  
  49.